package com.aaa.forum.dao;

import com.aaa.forum.model.ReplyLike;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface ReplyLikeMapper {
    int insert(ReplyLike row);

    int insertSelective(ReplyLike row);

    ReplyLike selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ReplyLike row);

    int updateByPrimaryKey(ReplyLike row);

    /**
     * 根据 用户id 和 帖子id 查询点赞记录
     * @param userId        用户id
     * @param replyId       评论id
     * @return              点赞记录
     */
    ReplyLike selectByUserIdAndArticleId(@Param("userId") Long userId, @Param("replyId") Long replyId);
}